//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// This SLIC file will find out what Government you are in, and store it in GOVT_WhatGovtAmI.
// To further use this, GOVT_WhatGovtAmI equals the government index from govern.txt (not in discovery order).
//
// What Govt Am I? script for CTP2 - Version 0.3
//
// By Dale Kent - 9 November 2002
//
// Use freely where so you may see fit.  :)
//
// See me at Apolyton CTP2 forums - http://www.apolyton.net/forums
//
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

What this Mod does:
This Mod is a project I've been trying to get working for almost 2 years. It finds out and stores what Govt everyone is in for use in other scripts. This script is intended for other Modders to help them in their projects. Please leave the header of this script with the code. 

How to add this to a Mod?
1. Put this SLIC in the usual place and add to script.slc

2. Create temp units in Units.txt for every government in the Mod, remembering to use the "GovernmentType" flag to limit each unit to a seperate government (IE: like the Cleric is). These units MUST be one after the other and in GovernmentDB order!  See the included units.txt for an example of how to setup these units (I just copied/pasted the settler, you can use anything).  Also remember that this unit will be deleted from the build queue each and every turn.  Also, to avoid accumulating production if you have nothing in the build queue, production will be zeroed if one of these units is found at the head of the build queue.

3. Open this SLIC and modify the following:
- In 'GOVT_SetupArrays' setup the GOVT_GovtUnits array with the names of every temp unit.
- In 'GOVT_SetupArrays' change the variable GOVT_FirstUnitIndex to the UnitDB index of the first temp unit. In the vanilla game this is 72 if you put the temp units after all the others.

4. In 'gl_str.txt' add names for these temp units (I would use something like "Govt Check Unit").

5. When referencing the Govt variable, check GOVT_WhatGovtAmI[playerNum] to get the GovernmentDB index (IE: If in Tyranny in vanilla game you get 10).

Hope this is useful to your project.  :)

Thanks
Dale Kent
